/**
 * 
 */
package STUDENTS.TRANVANCHO.Sources.EXCER;

import java.util.Scanner;

import com.sun.org.apache.regexp.internal.recompile;

public class bai_toan_05_tham_gia_ket_ban {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		System.out.println("moi ban nhap vao Fullname:");
		sc = new Scanner(System.in);
		String FullName = sc.nextLine();
		if (FullName.isEmpty()) {
			System.out.println("ban phai nhap day du ho ten");
			return;
		}
		System.out.println("moi ban nhap vao tuoi:");
		String strTemp = sc.nextLine();
		if (strTemp.isEmpty())
			
		{
			System.out.println("ban phai nhap vao tuoi");
		return;
		}
		byte bAge = Byte.parseByte(strTemp);
		System.out.println("chon tinh trang hon nhan:0 chua; 1 ly hon; 2 da ket hon");
		strTemp = sc.nextLine();
		if (strTemp.isEmpty())
		{
			System.out.println("moi ban chon lai tinh trang hon nhan");
			return;
		}
	byte bMarriage=Byte.parseByte(strTemp);
	System.out.println("ban chon gioi tinh; 1 la nu; 2 la nam");
	strTemp=sc.nextLine();
	if (strTemp.isEmpty()){
		System.out.println("ban phai chon gioi tinh");
		return;
	}
	byte bsex=Byte.parseByte(strTemp);
	if (bAge<19||bMarriage==2||(bAge<22 && bsex==1))
	{
		System.out.println("ban khong duoc phep ket hon");
	}
	else{
		System.out.println("ban duoc phep ket hon");
	}
	}
}



